//
//  ClassifyData.m
//  TextApplication
//
//  Created by dllo on 16/9/8.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "ClassifyData.h"
#import "ClassItems.h"

@implementation ClassifyData

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"items"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ClassItems *class = [ClassItems modelWithDic:dic];
            [array addObject:class];
        }
        _items = array;
    }
}

@end
